package ${package_name}.mysql.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Id;

/**
 * @Description ${table_annotation}
 * @author ${author}
 * @date ${date}
 */
@Entity
@Table(name = "${table_name}")
public class ${model_name}{

<#if model_column?exists>
    <#list model_column as model>
        <#if model.columnName != 'id'>
    //${model.columnComment}
    @Column(name = "${model.columnName}")
        </#if>
        <#if model.columnName = 'id'>
    @Id
        </#if>
        <#if model.columnType = 'VARCHAR' || model.columnType = 'TEXT' || model.columnType = 'CHAR'>
    private String ${model.changeColumnName?uncap_first};
    
        </#if>
        <#if model.columnType = 'TIMESTAMP' || model.columnType = 'DATETIME' || model.columnType = 'DATE'>
    private Date ${model.changeColumnName?uncap_first};
    
        </#if>
        <#if model.columnType = 'INT' >
    private Integer ${model.changeColumnName?uncap_first};
    
        </#if>
        <#if model.columnType = 'TINYINT' >
    private Boolean ${model.changeColumnName?uncap_first};
    
        </#if>
        <#if model.columnType = 'DOUBLE' >
    private Double ${model.changeColumnName?uncap_first};
    
        </#if>
    </#list>
</#if>

<#if model_column?exists>
    <#list model_column as model>
        <#if (model.columnType = 'VARCHAR' || model.columnType = 'TEXT') || model.columnType = 'CHAR'>
        
    public String get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(String ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
        </#if>
        <#if model.columnType = 'TIMESTAMP' || model.columnType = 'DATETIME' || model.columnType = 'DATE'>
        
    public Date get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }

    public void set${model.changeColumnName}(Date ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
        </#if>
        <#if model.columnType = 'INT' >
        
    public Integer get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }
    
    public void set${model.changeColumnName}(Integer ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
        </#if>
        
        <#if model.columnType = 'TINYINT' >
        
    public Boolean get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }
    
    public void set${model.changeColumnName}(Boolean ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
        </#if>
        
        <#if model.columnType = 'DOUBLE' >
        
    public Double get${model.changeColumnName}() {
        return this.${model.changeColumnName?uncap_first};
    }
    
    public void set${model.changeColumnName}(Double ${model.changeColumnName?uncap_first}) {
        this.${model.changeColumnName?uncap_first} = ${model.changeColumnName?uncap_first};
    }
        </#if>
    </#list>
</#if>

}